package org.smart4j.aopdemo.aspectj;

import org.smart4j.aopdemo.simple.GreetingImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class GreetingAspectDemo {

    public static void main(String[] args){
        ApplicationContext ctx = new ClassPathXmlApplicationContext("/bean_aspectj.xml");
        for(String beanName:ctx.getBeanDefinitionNames()){
            System.out.println(beanName);
        }
        GreetingImpl greetingImpl = (GreetingImpl) ctx.getBean("greetingImpl");
        greetingImpl.sayHello("liuzx");
        //greetingImpl.sayThrow();
        greetingImpl.sayHelloTag();

    }

}
